import { Component } from '@angular/core';
import {OnInit} from "@angular/core";
import {HttpClient} from "@angular/common/http";
@Component({
  selector: 'app-user-list',
  templateUrl: './user-list.component.html',
  styleUrls: ['./user-list.component.css']
})
export class UserListComponent implements OnInit{
  constructor(public http:HttpClient) {}
  private url_list = "http://localhost:8080/user/list";
  users=[{
    email:'',
    phone:'',
    userID:'',
    username:''
  }];
  ngOnInit(): void {
    this.http.get(this.url_list)
      .subscribe((response:any)=>{
        this.users=response;
      })
  }

}
